package com.simple.portal.vo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "MENU")
public class MenuVO implements Serializable,Comparable<Object>{

	private static final long serialVersionUID = 1887264469615088744L;

	@Id
	@Column(name = "MENU_ID")
	private String menuId;
	
	@Column(name = "MENU_NAME")
	private String menuName;
	
	@Column(name = "URL")
	private String url;
	
	@Column(name = "MENU_LEVEL")
	private String menuLevel;
	
	@Column(name = "PARENT_ID")
	private String parentId;
	
	@Column(name = "SORT_NO")
	private Integer  sortNo;

	public String getMenuId() {
		return menuId;
	}

	public void setMenuId(String menuId) {
		this.menuId = menuId;
	}

	public String getMenuName() {
		return menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getMenuLevel() {
		return menuLevel;
	}

	public void setMenuLevel(String menuLevel) {
		this.menuLevel = menuLevel;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public Integer getSortNo() {
		return sortNo;
	}

	public void setSortNo(Integer sortNo) {
		this.sortNo = sortNo;
	}
	
	public int compareTo(Object o) {  
		  
		MenuVO others = null;  
        if (o instanceof MenuVO) {  
            others = (MenuVO) o;  
        }  
        return this.sortNo - others.sortNo;  
    }

}
